package com.cande.loki.exercise.dynamicproxy;

import java.lang.reflect.Proxy;

/**
 * @auther ROCK CODER
 * @DATE 2022/3/24 21:20
 * @Description
 */
public class Test {
    public static void main(String[] args) {
        Man man = new Human();
        ManHandler manHandler = new ManHandler(man);
        Man manproxy = (Man) Proxy.newProxyInstance(man.getClass().getClassLoader(), new Class[]{Man.class},manHandler);
        manproxy.say();

        System.out.println(manproxy.getClass().getName());

    }
}
